var e = getApp(), t = require("../template/index.js"), a = {
    data: {
        msg_template: "",
        sure_template: "呼叫",
        down_items: [],
        id: "",
        types: ""
    },
    onLoad: function(t) {
        for (var a = this, n = e.getSecret(), i = decodeURIComponent(t.scene).split("&"), s = {}, r = 0; r < i.length; r++) {
            var o = i[r].split("=");
            s[o[0]] = o[1];
        }
        this.setData({
            msg_template: i[2].replace(/,/, " 转 ").replace(/-/g, " ")
        });
        var p = e.extend({
            currtime: n.currtime,
            sign: n.sign,
            id: i[1],
            type: i[0],
            employee_id: i[3],
            employee_type: i[4]
        }, t);
        wx.request({
            url: e.globalData.haozuBase + "/api/miniapps/landing/",
            data: p,
            success: function(e) {
                var t = e.data.data;
                a.setData({
                    down_items: t
                });
            }
        });
    },
    toIndexFn: function() {
        wx.redirectTo({
            url: "/pages/index/index"
        });
    },
    callFn: function() {
        var e = this;
        wx.makePhoneCall({
            phoneNumber: e.data.msg_template.replace(/转/, ",")
        });
    },
    onShow: function() {}
};

e.extend(a, t), Page(a);